﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Palsta.Core.View;
using System.Xml;

namespace Palsta.Core.View.Parser
{
    class ViewParserAttribute
    {
        public static XsltEle Parse(XmlNode node, XsltEle parent, logger.Logger logger)
        {
            XsltEleAttribute domSetAttr = new XsltEleAttribute();
            String attrName = node.Attributes["name"].Value;
            if (attrName == null || attrName.Length == 0)
            {
                return null;
            }
            domSetAttr.AttrName = attrName;

            XsltEle inner = ViewParser.ParseSubNode(node);
            if (inner != null)
            {
                domSetAttr.ValueNode = inner;
            }
            return domSetAttr;
        }
    }
}
